package com.zmn.uac.common.constant;

/**
 * 类描述：
 *
 * @author xujie
 * @since 2021/05/24 10:59
 */
public class RedisKeyConstant {

    /**
     * 钉钉 suite_ticket 推送事件 回调参数
     */
    public static final String UAC_DING_TALK_CALLBACK_SUITE_TICKET = "uac:dingTalkCallback:suiteTicket";

    /**
     * 钉钉 accessToken
     */
    public static final String UAC_DING_TALK_ACCESS_TOKEN = "uac:dingTalkCallback:accessToken";

    /**
     * 渠道应用配置
     */
    private static final String UAC_CHANNEL_APP_KEY = "uac:channelApp:channelId:";

    /**
     * 渠道名称
     */
    private static final String UAC_CHANNEL_NAME_KEY = "uac:channelName:channelId:";

    /**
     * 渠道应用配置
     */
    private static final String UAC_THIRD_APP_KEY = "uac:thirdApp:channelId:";
    /**
     * 店铺应用配置
     */
    private static final String UAC_SHOP_APP_KEY = "uac:shopApp:shopId:";


    /**
     * 获取 渠道应用配置 key
     *
     * @param channelId channelId
     * @return String
     */
    public static String getChannelAppKey(Integer channelId) {

        return UAC_CHANNEL_APP_KEY + channelId;
    }

    /**
     * 获取 渠道名称 key
     *
     * @param channelId channelId
     * @return String
     */
    public static String getChannelNameKey(Integer channelId) {

        return UAC_CHANNEL_NAME_KEY + channelId;
    }

    /**
     * 获取 渠道应用配置 key
     *
     * @param channelId channelId
     * @return String
     */
    public static String getThirdAppKey(String channelId) {

        return UAC_THIRD_APP_KEY + channelId;
    }

    /**
     * 获取 店铺应用配置 key
     *
     * @param shopId shopId
     * @return String
     */
    public static String getShopAppKey(Integer shopId) {

        return UAC_SHOP_APP_KEY + shopId;
    }
}
